repo: Clean up tmpdir also on transaction abort
authorColin Walters <walters@verbum.org>
Tue, 27 Aug 2013 15:32:26 +0000 (11:32 -0400)
committerColin Walters <walters@verbum.org>
Tue, 27 Aug 2013 15:35:45 +0000 (11:35 -0400)
commitd92eedac4a3fe3dcccbc925824eceda393e8148b
tree22470538b1573ac2303cf6af626c3274b2a9ae67
parentd58a4c9f79f248edbcc4b40f82c060c559e30378
repo: Clean up tmpdir also on transaction abort

Pull the cleanup code to a helper function, and ensure we delete
leftover temporary files also when aborting a transaction.  Mainly
this will happen if a local 'ostree commit' fails.

While we're here, also change it to use gs_shutil_rm_rf() which also
handles directories, should we start using those.

Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
src/libostree/ostree-repo.c